import 'package:im_flutter_sdk/im_flutter_sdk.dart';

class IMManager {
  static IMManager get instance => IMManager._();
  factory IMManager() {
    return instance;
  }
  IMManager._();
  void register() async {
    EMOptions options = EMOptions(appKey: '1136211228118823#industry');
    options.debugModel = true;
    EMPushConfig config = EMPushConfig();
// 配置推送信息
    config.enableAPNs("产业互联网");
    options.pushConfig = config;
    await EMClient.getInstance.init(options);
  }

  void login() {
    if (EMClient.getInstance.isLoginBefore) {
      EMClient.getInstance.login('18530059861', '123456');
    }
  }
}
